/**
 * 
 */
package qy.jalgotrade.broker.backtesting;

import qy.jalgotrade.broker.Order;

/**
 * <pre>
 * Commission models
 * 
 * Base class for implementing different commission schemes.
 * 
 * .. note::
 *     This is a base class and should not be used directly. 佣金计算模式为双边收取, 即买 / 卖均收取.
 * </pre>
 * 
 * @author c-geo
 *
 */
public abstract class Commission {

	/**
	 * Calculates the commission for an order execution.
	 * 
	 * @param order    The order being executed.
	 * @param price    The price for each share.
	 * @param quantity The order size.
	 * @return
	 */
	public abstract double calculate(Order order, double price, double quantity);
}
